<?php

namespace App\Http\Controllers;

use App\Services\ConstellationServices;
use Illuminate\Http\Request;

class ConstellationController extends Controller
{
    protected $constellationServices;

    public function __construct(Request $request, ConstellationServices $constellationServices)
    {
        parent::__construct($request);
        $this->constellationServices = $constellationServices;
    }

    public function getConstellValue()
    {
        $constellationName = $this->requests['name'];
        $type = $this->requests['type'];
        $result = $this->constellationServices->getConstellValue($constellationName, $type);
        return renderSuccessJson($result);
    }
}
